package com.igeek.boot.common;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @package com.igeek.boot.vo
 * @Description 返回给前端交互的数据
 * @Author LittlePunk [296526219@qq.ccom]
 * @Version 2022.1
 * @Date 2023/12/13 10:41
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("前后端交互的json数据")
public class Result<T> {

    @ApiModelProperty("返回的结果信息")
    private String msg;
    @ApiModelProperty("返回的状态码")
    private int code;
    @ApiModelProperty("返回的结果数据")
    private T data;

    public Result(String msg, int code) {
        this.msg = msg;
        this.code = code;
    }
}
